<?php
/**
 * ===============================================
 * 版权所有 2019-2050 青岛铁锤科技有限公司，并保留所有权利。
 * 网站地址: http://www.huaxianling.com
 * ===============================================
 * Author: Happy dong
 * Created Time: 2019-07-06 10:44
 *
 * Version: 2.0
 */

namespace App\Models;


use Illuminate\Database\Eloquent\Model;

class VisitHistory extends Model
{
	protected $table='visit_history';
	protected $guarded = [];
	protected $hidden = ['updated_at'];

	public function  setVisitTimeAttribute($value){
		$this->attributes['visit_time'] = date('Y-m-d H:i:s',$value);
	}

	public function member(){
		return $this->hasOne(Member::class,'id','member_id');
	}
}
